home *** CD-ROM | disk | FTP | other *** search
- on returnToSlideshow
- global oStoryteller, gSavedOffice, gAmberPath, colorcrsr, domainIsReady
- set startingLocation to getState(oStoryteller, #currentLocation)
- put startingLocation
- if startingLocation = #OfficeExit then
- put "yes, it was #OfficeExit"
- setProp(the lsStateData of oStoryteller, #currentLocation, [#OfficeEntry2])
- else
- put "no, it wasn't #OfficeExit"
- end if
- goTo(#Office_Tunnel_OUT, #forward)
- set domainIsReady to 0
- cursorOff()
- if objectp(colorcrsr) then
- colorcrsr(mReleaseCursor)
- colorcrsr(mdispose)
- set colorcrsr to #comingBack
- cursor(0)
- cursor(4)
- end if
- go("reviews", gAmberPath & "AMBERHUB")
- end
-
- on startMovie
- global colorcrsr, gGammaLevel
- if objectp(colorcrsr) then
- colorcrsr(mReleaseCursor)
- colorcrsr(mdispose)
- set colorcrsr to #comingBack
- end if
- cursor(0)
- cursor(4)
- checkForPatches()
- if gGammaLevel = "unknown" then
- stripMenu()
- end if
- end
-
- on stripMenu
- set cNum to 14
- installMenu(0)
- set totalLines to the number of lines in field cNum
- set targetLine to 0
- repeat with i = 1 to totalLines
- if line i of field cNum contains "Brightness" then
- set targetLine to i
- exit repeat
- end if
- end repeat
- if targetLine = 0 then
- put "<!> Can't trim menu twice!"
- exit
- end if
- delete line targetLine of field cNum
- repeat while line targetLine of field cNum <> EMPTY
- if line targetLine of field cNum contains "menu:" then
- exit repeat
- end if
- delete line targetLine of field cNum
- end repeat
- end
-
- on checkForPatches
- global oPatchManager
- if objectp(oPatchManager) then
- patchMe(oPatchManager, the movieName)
- end if
- end
-
- on closePatchFile
- global oPatchManager
- if objectp(oPatchManager) then
- closePatchFile(oPatchManager)
- end if
- end
-
- on setGammaLevel desiredLevel
- global gCurrentGamma, gGammaLevel
- set currentLevel to gGammaLevel
- set lsSettings to [:]
- repeat with pNum = 1 to 7
- addProp(lsSettings, pNum, gCurrentGamma - float((pNum - gGammaLevel) * 0.10000000000000001))
- end repeat
- set newGamma to getaProp(lsSettings, desiredLevel)
- if voidp(newGamma) then
- put "<!> Sorry, " & desiredLevel & " is not an acceptable value for desired level (try 1 - 7)"
- exit
- end if
- setGammaTable(newGamma)
- set gCurrentGamma to newGamma
- repeat with i = 1 to 7
- set the checkMark of menuItem i of menu 4 to 0
- end repeat
- set the checkMark of menuItem (8 - desiredLevel) of menu 4 to 1
- set gGammaLevel to desiredLevel
- end
-
- on setGammaTable gammaSetting
- global oGamma, gMainScreen, gGammaSize, gGammaLevel
- if gammaSetting < 0.10000000000000001 then
- put "<i> Sorry, " & gammaSetting & " is not a good value; resetting it to 0.1.."
- set gammaSetting to 0.10000000000000001
- end if
- set howManyChannels to gGammaSize / 256
- set highGamma to oGamma(mReadGammaTable, gMainScreen, gGammaSize)
- set xMultiplier to float(highGamma / 255.0)
- set newTable to []
- repeat with cNum = 1 to howManyChannels
- repeat with x = 0 to 255
- set y to highGamma * power(x * xMultiplier / float(highGamma), gammaSetting)
- append(newTable, integer(y))
- end repeat
- end repeat
- repeat with entryNum = 1 to 256 * howManyChannels
- oGamma(mWriteGammaTable, gMainScreen, entryNum, getAt(newTable, entryNum))
- end repeat
- end
-